package com.one.blocks.rbac.manager;

import com.one.blocks.mvc.manager.AbstractBatchManager;
import com.one.blocks.rbac.domain.SysUserOrg;
import com.one.blocks.rbac.mapper.SysUserOrgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author <a href="mailto:idler41@163.con">idler41</a> created on 2022-02-14 13:57:56
 */
@Service
public class SysUserOrgManager extends AbstractBatchManager<SysUserOrgMapper, SysUserOrg> {

    @Autowired
    public SysUserOrgManager(SysUserOrgMapper mapper) {
        super(mapper);
    }

    @Transactional(rollbackFor = Exception.class)
    public void deleteByOrgId(Integer orgId) {
        mapper.deleteByOrgId(orgId);
    }
}